<me:VBPRULES x:Class="WPFExcelReport.TSPRULES"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"   
                    xmlns:AP="clr-namespace:WPFExcelReport;assembly=TAPKOPF"  
                     xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                     x:Name="TV"
                    Loaded="Window_Loaded">
    <me:VBPRULES.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:DateNYR x:Key="nyr"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:VBPRULES.Resources>
    <StackPanel>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>

            <WrapPanel  Grid.Column="0">
                <TextBlock Text="{Binding Source={Localization:Translate Word=细纱:}}" Width="80"/>
                <TextBlock  Grid.Column="1"   Text="{Binding Path=ORDERNUM}" Visibility="Collapsed"
                            Width="100" HorizontalAlignment="Left"/>
                <TextBlock  Text="{Binding FLOW,ElementName=TV}" Visibility="Collapsed" />
                <AP:TSAP02 KRS="XS"  ARTST="G" Grid.Column="2" 
                           Name="cAP02"
                        dwAP="{Binding dwAP,ElementName=TV}" 
                      KEY ="{Binding FLOW,ElementName=TV}"  
                       WH="{Binding WH,ElementName=TV}"/> 
            </WrapPanel>
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=细纱kg:}}" Width="80"/>
            <ex:NumericBox  Grid.Column="1" Text="{Binding Path=QTYEND}" 
                     HorizontalAlignment="Left" Width="80" />
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=细纱交期:}}" Width="80"/>
            <ex:NumericBox  Grid.Column="1"  Text="{Binding Path=DELDATE,Converter={StaticResource nyr}}"    
                     HorizontalAlignment="Left" Width="100"/>
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=开始日期:}}" Width="80"/>
            <TextBox  Grid.Column="1"   Text="{Binding Path=STARTDATE,Converter={StaticResource nyr}}" 
                     Width="100"
                     HorizontalAlignment="Left"/>
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=周期:}}" Width="80"/>
            <ex:NumericBox  Grid.Column="1"   Text="{Binding Path=LEADTIME}" 
                     Width="40" HorizontalAlignment="Left"/>
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=台日产:}}" Width="80"/>
            <ex:NumericBox  Grid.Column="1"  Text="{Binding Path=UNITQTY}" 
                     Width="60" HorizontalAlignment="Left"   />
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=细纱机台:}}" Width="80"/>
            <ex:NumericBox  Grid.Column="1"  Text="{Binding Path=UNITNUM}" 
                     Width="60" HorizontalAlignment="Left"  
                     />
        </Grid>

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=粗纱加成kg:}}" Width="80"/>
            <ex:NumericBox  Grid.Column="1"  Text="{Binding Path=R01}" 
                     Width="60" HorizontalAlignment="Left"    />
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=粗纱损耗%:}}" Width="80"/>
            <TextBox Grid.Column="1"  Text="{Binding Path=F01}" 
                     Width="60" HorizontalAlignment="Left"   />
        </Grid>

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition> 
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=梳理方式:}}" Width="80"/>
            <SD:K9315  Grid.Column="2" 
                        KEY="{Binding P01,ElementName=TV}"
                        EXAUF="{Binding P01,ElementName=TV}"
                        /> 
        </Grid>
    </StackPanel> 
</me:VBPRULES>
